%Application Project: Adjacency Matrices 

%Figure 1 adjacency matrix
M = [0, 1, 0, 0, 0, 0; 1, 0, 1, 0, 1, 0; 0, 1, 0, 0, 0, 1; 0, 0, 0, 0, 0, 0;... 
   0, 1, 0, 0, 0, 1; 0, 0, 1, 0, 1, 1]

% Adjacency matrix for Cape Air
B = [0, 1, 1, 1, 0, 0, 1; 1, 0, 1, 1, 0, 0, 0;...
      1, 1, 0, 1, 1, 1, 0; 1, 1, 1, 0, 1, 1, 0; 0, 0, 1, 1, 0, 0, 0;...
      0, 0, 1, 1, 0, 0, 0; 1, 0, 0, 0, 0, 0, 0]

%question 7
D = [0 1 0 1 1 0 0 1 0 0 0 1 1 0; 1 0 0 1 1 1 0 1 0 0 0 1 0 0 ; ...
   0 0 0 1 1 1 0 1 0 1 1 1 1 0 ;  1 1 1 0 0 0 1 0 1 1 0 0 0 1; ...
   1 1 1 0 0 0 0 0 0 1 0 0 0 0 ;  0 1 1 0 0 0 0 0 0 0 0 0 0 0;...
   0 0 0 1 0 0 0 0 0 1 0 0 0 1;   1 1 1 0 0 0 0 0 1 1 0 0 0 0; ...
   0 0 0 1 0 0 0 1 0 0 0 1 0 0 ; 0 0 1 1 1 0 1 1 0 0 0 0 0 0;...
   0 0 1 0 0 0 0 0 0 0 0 0 0 0 ; 1 1 1 0 0 0 0 0 1 0 0 0 0 0 ;...
   1 0 1 0 0 0 0 0 0 0 0 0 0 0; 0 0 0 1 0 0 1 0 0 0 0 0 0 0]